<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Behavior3Editor批量导出改造 | Abel&#39;Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="开始部署环境 安装环境 设置梯子 遇到的问题 node，gulp版本不合 在做dist的时候，还是会下载electronc 文件占用 修改gulpfile.js     批量导出子树源码 增加目录的支持 参考  项目里面需要将行为树project批量的导出子树。 源代码 开始部署环境安装环境将node.js 设置成 10.x win32版本，再去匹配 gulp 的版本。 通过命令行安装gulp工">
<meta property="og:type" content="article">
<meta property="og:title" content="Behavior3Editor批量导出改造">
<meta property="og:url" content="http://example.com/2021/03/15/2021/2021-03-15-BEHAVIOR3EDITOR%E5%AD%A6%E4%B9%A0/index.html">
<meta property="og:site_name" content="Abel&#39;Blog">
<meta property="og:description" content="开始部署环境 安装环境 设置梯子 遇到的问题 node，gulp版本不合 在做dist的时候，还是会下载electronc 文件占用 修改gulpfile.js     批量导出子树源码 增加目录的支持 参考  项目里面需要将行为树project批量的导出子树。 源代码 开始部署环境安装环境将node.js 设置成 10.x win32版本，再去匹配 gulp 的版本。 通过命令行安装gulp工">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://z3.ax1x.com/2021/03/24/6HhDc6.png">
<meta property="article:published_time" content="2021-03-14T16:00:00.000Z">
<meta property="article:modified_time" content="2021-07-28T09:14:49.645Z">
<meta property="article:author" content="Abel Sean">
<meta property="article:tag" content="Game">
<meta property="article:tag" content="AI">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://z3.ax1x.com/2021/03/24/6HhDc6.png">
  
    <link rel="alternate" href="/atom.xml" title="Abel&#39;Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Abel&#39;Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-2021/2021-03-15-BEHAVIOR3EDITOR学习" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2021/03/15/2021/2021-03-15-BEHAVIOR3EDITOR%E5%AD%A6%E4%B9%A0/" class="article-date">
  <time datetime="2021-03-14T16:00:00.000Z" itemprop="datePublished">2021-03-15</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Behavior3Editor批量导出改造
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <ul>
<li><a href="#%E5%BC%80%E5%A7%8B%E9%83%A8%E7%BD%B2%E7%8E%AF%E5%A2%83">开始部署环境</a><ul>
<li><a href="#%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83">安装环境</a></li>
<li><a href="#%E8%AE%BE%E7%BD%AE%E6%A2%AF%E5%AD%90">设置梯子</a></li>
<li><a href="#%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98">遇到的问题</a><ul>
<li><a href="#nodegulp%E7%89%88%E6%9C%AC%E4%B8%8D%E5%90%88">node，gulp版本不合</a></li>
<li><a href="#%E5%9C%A8%E5%81%9Adist%E7%9A%84%E6%97%B6%E5%80%99%E8%BF%98%E6%98%AF%E4%BC%9A%E4%B8%8B%E8%BD%BDelectronc">在做dist的时候，还是会下载electronc</a></li>
<li><a href="#%E6%96%87%E4%BB%B6%E5%8D%A0%E7%94%A8">文件占用</a></li>
<li><a href="#%E4%BF%AE%E6%94%B9gulpfilejs">修改gulpfile.js</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#%E6%89%B9%E9%87%8F%E5%AF%BC%E5%87%BA%E5%AD%90%E6%A0%91%E6%BA%90%E7%A0%81">批量导出子树源码</a></li>
<li><a href="#%E5%A2%9E%E5%8A%A0%E7%9B%AE%E5%BD%95%E7%9A%84%E6%94%AF%E6%8C%81">增加目录的支持</a></li>
<li><a href="#%E5%8F%82%E8%80%83">参考</a></li>
</ul>
<p>项目里面需要将行为树project批量的导出子树。</p>
<p><a target="_blank" rel="noopener" href="https://github.com/swordhell/behavior3editor">源代码</a></p>
<h1 id="开始部署环境"><a href="#开始部署环境" class="headerlink" title="开始部署环境"></a>开始部署环境</h1><h2 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h2><p>将node.js 设置成 10.x win32版本，再去匹配 gulp 的版本。</p>
<p>通过命令行安装gulp工具。</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">npm install gulp-cli -g</span><br><span class="line">npm install gulp -D</span><br><span class="line">npx -p touch nodetouch gulpfile.js</span><br><span class="line">gulp --<span class="built_in">help</span></span><br></pre></td></tr></table></figure>

<h2 id="设置梯子"><a href="#设置梯子" class="headerlink" title="设置梯子"></a>设置梯子</h2><figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">npm config <span class="built_in">set</span> registry http://registry.npm.taobao.org</span><br><span class="line"></span><br><span class="line">其实就是 .npmrc</span><br><span class="line"></span><br><span class="line">registry=http://registry.npm.taobao.org</span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">@REM 将npm的缓存都删除掉</span></span><br><span class="line">npm cache clear --force</span><br><span class="line"></span><br><span class="line">// 配置梯子，否则就会无法安装；</span><br><span class="line">Add the below entry to your .bowerrc:</span><br><span class="line">&#123;</span><br><span class="line">  &quot;proxy&quot;:&quot;http://&lt;user&gt;:&lt;password&gt;@&lt;host&gt;:&lt;port&gt;&quot;,</span><br><span class="line">  &quot;https-proxy&quot;:&quot;http://&lt;user&gt;:&lt;password&gt;@&lt;host&gt;:&lt;port&gt;&quot;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="遇到的问题"><a href="#遇到的问题" class="headerlink" title="遇到的问题"></a>遇到的问题</h2><figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">bower sweetalert#~<span class="number">1</span>.<span class="number">0</span>.<span class="number">0</span>-beta              cached https://github.com/t4t5/sweetalert.git#<span class="number">1</span>.<span class="number">0</span>.<span class="number">1</span></span><br><span class="line">bower sweetalert#~<span class="number">1</span>.<span class="number">0</span>.<span class="number">0</span>-beta            validate <span class="number">1</span>.<span class="number">0</span>.<span class="number">1</span> against https://github.com/t4t5/sweetalert.git#~<span class="number">1</span>.<span class="number">0</span>.<span class="number">0</span>-beta</span><br><span class="line">bower fontawesome#~<span class="number">4</span>.<span class="number">3</span>.<span class="number">0</span>                 ECMDERR Failed to execute &quot;git ls-remote --tags --heads https://github.com/FortAwesome/Font-Awesome.git&quot;, <span class="keyword">exit</span> code of #<span class="number">128</span> fatal: unable </span><br><span class="line">to access &#x27;https://github.com/FortAwesome/Font-Awesome.git/&#x27;: Failed to connect to github.com port <span class="number">443</span>: Timed out</span><br><span class="line"></span><br><span class="line">Additional error details:</span><br><span class="line"><span class="function">fatal: <span class="title">unable</span> <span class="title">to</span> <span class="title">access</span> &#x27;<span class="title">https</span>://<span class="title">github.com</span>/<span class="title">FortAwesome</span>/<span class="title">Font</span>-<span class="title">Awesome.git</span>/&#x27;: <span class="title">Failed</span> <span class="title">to</span> <span class="title">connect</span> <span class="title">to</span> <span class="title">github.com</span> <span class="title">port</span> 443: <span class="title">Timed</span> <span class="title">out</span></span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">// 配置梯子，否则就会无法安装；</span></span><br><span class="line"><span class="function"><span class="title">Add</span> <span class="title">the</span> <span class="title">below</span> <span class="title">entry</span> <span class="title">to</span> <span class="title">your</span> .<span class="title">bowerrc</span>:</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">&#123;</span></span><br><span class="line"><span class="function">  &quot;<span class="title">proxy</span>&quot;:&quot;<span class="title">http</span>://&lt;<span class="title">user</span>&gt;:&lt;<span class="title">password</span>&gt;@&lt;<span class="title">host</span>&gt;:&lt;<span class="title">port</span>&gt;&quot;,</span></span><br><span class="line"><span class="function">  &quot;<span class="title">https</span>-<span class="title">proxy</span>&quot;:&quot;<span class="title">http</span>://&lt;<span class="title">user</span>&gt;:&lt;<span class="title">password</span>&gt;@&lt;<span class="title">host</span>&gt;:&lt;<span class="title">port</span>&gt;&quot;</span></span><br><span class="line"><span class="function">&#125;</span></span><br></pre></td></tr></table></figure>

<p>当下载实在不行的时候，可以直接通过github里面下载源码，然后直接放到目录中。</p>
<p>目录说明</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">bower_components   // bower 支持库目录</span><br><span class="line">  |</span><br><span class="line">  ----angular-<span class="built_in">tree</span>-control</span><br><span class="line">  |</span><br><span class="line">  ----...</span><br><span class="line">.temp-dist         // 打包输出exe的目录</span><br><span class="line">  |</span><br><span class="line">  |</span><br><span class="line">  ----behavior3editor-win32-ia32      // win32版本的exe</span><br><span class="line">  |</span><br><span class="line">  ----...</span><br><span class="line">node_modules      // node.js 支持库目录</span><br></pre></td></tr></table></figure>

<h3 id="node，gulp版本不合"><a href="#node，gulp版本不合" class="headerlink" title="node，gulp版本不合"></a>node，gulp版本不合</h3><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">PS</span> D:\work\trunk\behavior3editor_bf&gt; gulp serve</span><br><span class="line">ReferenceError: primordials is not defined</span><br><span class="line">    at fs.js:<span class="number">45</span>:<span class="number">5</span></span><br><span class="line">    at req_ (D:\work\trunk\behavior3editor_bf\node_modules\natives\index.js:<span class="number">143</span>:<span class="number">24</span>)</span><br><span class="line">    at Object.req [<span class="type">as</span> <span class="type">require</span>] (D:\work\trunk\behavior3editor_bf\node_modules\natives\index.js:<span class="number">55</span>:<span class="number">10</span>)</span><br><span class="line">    at Object.&lt;anonymous&gt; (D:\work\trunk\behavior3editor_bf\node_modules\graceful<span class="literal">-fs</span>\fs.js:<span class="number">1</span>:<span class="number">37</span>)</span><br><span class="line">    at Module._compile (internal/modules/cjs/loader.js:<span class="number">1063</span>:<span class="number">30</span>)</span><br><span class="line">    at Object.Module._extensions..js (internal/modules/cjs/loader.js:<span class="number">1092</span>:<span class="number">10</span>)</span><br><span class="line">    at Module.load (internal/modules/cjs/loader.js:<span class="number">928</span>:<span class="number">32</span>)</span><br><span class="line">    at Function.Module._load (internal/modules/cjs/loader.js:<span class="number">769</span>:<span class="number">14</span>)</span><br><span class="line">    at Module.require (internal/modules/cjs/loader.js:<span class="number">952</span>:<span class="number">19</span>)</span><br><span class="line">    at require (internal/modules/cjs/helpers.js:<span class="number">88</span>:<span class="number">18</span>)</span><br><span class="line"></span><br><span class="line">&gt; node -<span class="literal">-version</span></span><br><span class="line">v14.<span class="number">16.0</span></span><br><span class="line">&gt; gulp <span class="literal">-v</span></span><br><span class="line"><span class="built_in">CLI</span> version: <span class="number">2.3</span>.<span class="number">0</span></span><br><span class="line">Local version: <span class="number">3.9</span>.<span class="number">1</span></span><br></pre></td></tr></table></figure>

<p>解决方案：</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">##安装npm版本控制器</span><br><span class="line">npm install -g n</span><br><span class="line"></span><br><span class="line">##切换npm版本到 V10 (v10 版本的npm会安装 node <span class="number">10</span>)</span><br><span class="line">sudo n v10.<span class="number">19</span>.<span class="number">0</span></span><br><span class="line"></span><br><span class="line">##安装node</span><br><span class="line">npm i -g node</span><br><span class="line"></span><br><span class="line">##查看node版本</span><br><span class="line">node --version</span><br><span class="line"></span><br><span class="line">##现在node版本切换到了v10了，可以重新安装依赖的</span><br><span class="line">    #重新安装gulp（版本很重要，应该是代码发布时的版本，而不是本地的版本）</span><br><span class="line">    npm i -g gulp@<span class="number">3</span>.<span class="number">9</span>.<span class="number">1</span> --force</span><br><span class="line">    #重新安装依赖</span><br><span class="line">    npm install</span><br><span class="line"></span><br><span class="line">npm install -g nvm</span><br><span class="line"></span><br><span class="line">##运行</span><br><span class="line">gulp watch</span><br><span class="line">————————————————</span><br><span class="line">版权声明：本文为CSDN博主「内心毫无波动甚至还想笑」的原创文章，遵循CC <span class="number">4</span>.<span class="number">0</span> BY-SA版权协议，转载请附上原文出处链接及本声明。</span><br><span class="line">原文链接：https://blog.csdn.<span class="built_in">net</span>/yym836659673/article/details/<span class="number">104847572</span>/</span><br></pre></td></tr></table></figure>

<p>将node.js降低到 10.x版本，再去匹配 gulp 的版本。</p>
<p><a target="_blank" rel="noopener" href="https://nodejs.org/dist/latest-v10.x/">node.js_10.x版本下载</a></p>
<h3 id="在做dist的时候，还是会下载electronc"><a href="#在做dist的时候，还是会下载electronc" class="headerlink" title="在做dist的时候，还是会下载electronc"></a>在做dist的时候，还是会下载electronc</h3><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Downloading electron<span class="literal">-v0</span>.<span class="number">34.2</span><span class="literal">-linux</span><span class="literal">-ia32</span>.zip</span><br><span class="line">[&gt;                                            ] <span class="number">0.0</span>% (<span class="number">0</span> B/s)</span><br></pre></td></tr></table></figure>

<p>还需要安装：</p>
<p><a target="_blank" rel="noopener" href="https://github.com/electron/electron/releases/tag/v0.30.4">electron_v0.30.4下载地址</a><br>electron v0.34.2</p>
<p>国内下载地址：</p>
<p><a target="_blank" rel="noopener" href="https://npm.taobao.org/mirrors/electron/0.34.2/">国内源</a></p>
<p>使用<code>electron v0.34.2</code>的时候，需要使用<code>Node 8.x</code>版本的node.js。最后发布时间：17-Dec-2019 07:08</p>
<p><a target="_blank" rel="noopener" href="https://nodejs.org/dist/latest-v8.x/node-v8.17.0-x64.msi">下载页面</a></p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">The Node version <span class="keyword">in</span> &quot;E:/electron-v0.<span class="number">34</span>.<span class="number">2</span>-win32-ia32/electron.exe&quot; is outdated (version ), we require <span class="built_in">at</span> least Node <span class="number">8</span>.x. Would you like to try debugging anyway?</span><br></pre></td></tr></table></figure>

<p>electron里面调整界面都是通过html来制作的。</p>
<p><code>variables.less</code>文件里面<code>@size-sidebar: 500px;</code>修改了之后，可以让弹出框更加大。</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">var stat = fs.statSync(subPath);</span><br><span class="line">if (!stat.isDirectory())</span><br><span class="line">&#123;</span><br><span class="line">  fs.mkdirSync(subPath, &#123; recursive: <span class="literal">true</span> &#125;);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="文件占用"><a href="#文件占用" class="headerlink" title="文件占用"></a>文件占用</h3><p>打开资源管理器。</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">resmon.exe</span><br></pre></td></tr></table></figure>

<p>其实就是vscode的powershell占用了文件。重启一次vscode就好了。</p>
<h3 id="修改gulpfile-js"><a href="#修改gulpfile-js" class="headerlink" title="修改gulpfile.js"></a>修改gulpfile.js</h3><p>在这个文件里面，定义输出的版本是 windows arch类型： i32 就好了。</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">gulp.task(&#x27;_electron&#x27;, [&#x27;build&#x27;], function(cb) &#123;</span><br><span class="line">  packager(&#123;</span><br><span class="line">    dir       : &#x27;build&#x27;,</span><br><span class="line">    out       : &#x27;.temp-dist&#x27;,</span><br><span class="line">    name      : project.name,</span><br><span class="line">    platform  : &#x27;win32&#x27;,</span><br><span class="line">    arch      : &#x27;ia32&#x27;,</span><br><span class="line">    version   : &#x27;<span class="number">0.34</span><span class="number">.2</span>&#x27;,</span><br><span class="line">    overwrite : <span class="literal">true</span>,</span><br><span class="line">    asar      : <span class="literal">true</span></span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure>

<p>由于网络情况，如果想把全部平台的库都下载全了，也是比较困难的。</p>
<h1 id="批量导出子树源码"><a href="#批量导出子树源码" class="headerlink" title="批量导出子树源码"></a>批量导出子树源码</h1><p>改造的位置：</p>
<p>export.controller.js: 75 lines</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">save</span>(<span class="params"></span>)</span></span><br><span class="line"><span class="function">      &#125;<span class="title">else</span> <span class="title">if</span> (<span class="params">vm.type === <span class="string">&#x27;trees&#x27;</span></span>) </span>&#123;</span><br><span class="line">        dialogService</span><br><span class="line">          .openDirectory()</span><br><span class="line">          .then(<span class="function"><span class="keyword">function</span>(<span class="params">path</span>)</span>&#123;</span><br><span class="line">            tree = project.trees.each(<span class="function"><span class="keyword">function</span>(<span class="params">tree</span>) </span>&#123;</span><br><span class="line">              <span class="keyword">var</span> root = tree.blocks.getRoot();</span><br><span class="line">              defaultName = root.title;</span><br><span class="line">              <span class="keyword">var</span> fs = <span class="built_in">require</span>(<span class="string">&#x27;fs&#x27;</span>);</span><br><span class="line">              <span class="keyword">var</span> e = $window.editor.export;</span><br><span class="line">              _createJson(e.treeToData(tree))</span><br><span class="line">              <span class="built_in">console</span>.log(vm.pretty)</span><br><span class="line">              fs.writeFileSync(path +<span class="string">&#x27;/&#x27;</span>+defaultName +<span class="string">&#x27;.json&#x27;</span>, vm.pretty)</span><br><span class="line">              notificationService.success(</span><br><span class="line">                <span class="string">&#x27;File path&#x27;</span>,</span><br><span class="line">                defaultName +<span class="string">&#x27;.json&#x27;</span></span><br><span class="line">              );</span><br><span class="line">            &#125;);</span><br><span class="line">            </span><br><span class="line">          &#125;);</span><br><span class="line">        </span><br><span class="line">      &#125;</span><br></pre></td></tr></table></figure>

<p>其实就是将project.trees遍历；</p>
<p>将tree内容萃取出json；</p>
<p>直接使用fs模块，同步写入文件；</p>
<p>dialogService.openDirectory()能让用户自己指定输出目录；</p>
<p>notificationService.success()将日志输出到屏幕上；</p>
<p>我现在还不会如何调试，阅读了一点eletronc的文档，东西不少，今后有时间再来学习。</p>
<p>调试功能还是支持的</p>
<p>gulp serve</p>
<p><a target="_blank" rel="noopener" href="https://imgtu.com/i/6HhDc6"><img src="https://z3.ax1x.com/2021/03/24/6HhDc6.png" alt="6HhDc6.png"></a></p>
<p>在node.js中又很多丰富的库，所以使用这个来编写程序时候，多想想有没有三方库。这点类似python。</p>
<h1 id="增加目录的支持"><a href="#增加目录的支持" class="headerlink" title="增加目录的支持"></a>增加目录的支持</h1><p>在半年前，behavior3editor 作者在对这个编辑器做了一些提升，添加了path的概念。</p>
<p>src\app\pages\editor\components\menubar.html</p>
<p>文件里面可以修改界面。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">ng-click</span>=<span class="string">&quot;menubar.onExportTreesJson()&quot;</span>&gt;</span>Batch export trees as JSON<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>用了调试器，将会加快编写工作。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Cannot <span class="built_in">read</span> property <span class="string">&#x27;length&#x27;</span> of undefined</span><br></pre></td></tr></table></figure>

<p>在这套代码里面的目录规划</p>
<p>处在根目录的文件：</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">&quot;version&quot;</span>: <span class="string">&quot;0.3.0&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;scope&quot;</span>: <span class="string">&quot;tree&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;id&quot;</span>: <span class="string">&quot;62d315fa-c8bf-4fa2-9205-89cd6a1c5062&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;title&quot;</span>: <span class="string">&quot;BasicMonster&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;description&quot;</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;root&quot;</span>: <span class="string">&quot;6bb72df3-2b86-4cf4-8d43-d0c2c52e49c4&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;properties&quot;</span>: &#123;&#125;,</span><br><span class="line">  <span class="attr">&quot;parent&quot;</span>: <span class="literal">null</span>,</span><br><span class="line"></span><br><span class="line">  <span class="attr">&quot;custom_folders&quot;</span>: [</span><br><span class="line">    &#123;</span><br><span class="line">      <span class="attr">&quot;version&quot;</span>: <span class="string">&quot;0.3.0&quot;</span>,</span><br><span class="line">      <span class="attr">&quot;scope&quot;</span>: <span class="string">&quot;folder&quot;</span>,</span><br><span class="line">      <span class="attr">&quot;name&quot;</span>: <span class="string">&quot;f8f5b0bd-285e-400b-85f4-8ab673ea4fe8&quot;</span>,</span><br><span class="line">      <span class="attr">&quot;category&quot;</span>: <span class="string">&quot;tree&quot;</span>,</span><br><span class="line">      <span class="attr">&quot;title&quot;</span>: <span class="string">&quot;ai&quot;</span>,</span><br><span class="line">      <span class="attr">&quot;description&quot;</span>: <span class="string">&quot;ai子目录；&quot;</span>,</span><br><span class="line">      <span class="attr">&quot;parent&quot;</span>: <span class="literal">null</span></span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>

<p>tree 能被 folders 包含，folders也能设置parent。</p>
<p>当导出的时候，我们就能使用这个custom_folders来创建本地目录。</p>
<p>通过fs来迭代创建目录。</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">fs.mkdir(subPath, &#123; <span class="attr">recursive</span>: <span class="literal">true</span> &#125;, <span class="function"><span class="keyword">function</span>(<span class="params">err</span>) </span>&#123;&#125;);</span><br></pre></td></tr></table></figure>

<p>读取tree的folders信息：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 迭代方式读取目录结构</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">_fetchSubPath</span>(<span class="params">parent,custom_folders</span>) </span>&#123;</span><br><span class="line">  <span class="keyword">var</span> retStr = <span class="string">&quot;&quot;</span>;</span><br><span class="line">  <span class="keyword">var</span> node;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; custom_folders.length; i++) &#123;</span><br><span class="line">    <span class="keyword">if</span> (custom_folders[i].name == parent) &#123;</span><br><span class="line">      node = custom_folders[i];</span><br><span class="line">      <span class="keyword">break</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">if</span> (node.parent == <span class="literal">undefined</span>) &#123;</span><br><span class="line">    retStr = <span class="string">&quot;/&quot;</span> + node.title;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    retStr = _fetchSubPath(node.parent,custom_folders) + <span class="string">&quot;/&quot;</span> + node.title;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">return</span> retStr;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">_createJson</span>(<span class="params">data</span>) </span>&#123;</span><br><span class="line">  vm.data = data;</span><br><span class="line">  vm.compact = JSON3.stringify(data);</span><br><span class="line">  vm.pretty = JSON3.stringify(data, <span class="literal">null</span>, <span class="number">2</span>);</span><br><span class="line">  vm.result = vm.pretty;</span><br><span class="line">  vm.subPath = <span class="string">&quot;/&quot;</span>;</span><br><span class="line">  <span class="keyword">if</span> (data.parent == <span class="literal">undefined</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">if</span> (data.custom_folders == <span class="literal">undefined</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="comment">// 从custom_folders读取目录信息。</span></span><br><span class="line">  vm.subPath = _fetchSubPath(data.parent,data.custom_folders) + <span class="string">&quot;/&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>导出部分代码， export.controller.js function save()</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (vm.type === <span class="string">&#x27;trees&#x27;</span>) &#123;</span><br><span class="line">        dialogService</span><br><span class="line">          .openDirectory()</span><br><span class="line">          .then(<span class="function"><span class="keyword">function</span>(<span class="params">path</span>)</span>&#123;</span><br><span class="line">            tree = project.trees.each(<span class="function"><span class="keyword">function</span>(<span class="params">tree</span>) </span>&#123;</span><br><span class="line">              <span class="keyword">var</span> root = tree.blocks.getRoot();</span><br><span class="line">              defaultName = root.title;</span><br><span class="line">              <span class="keyword">var</span> fs = <span class="built_in">require</span>(<span class="string">&#x27;fs&#x27;</span>);</span><br><span class="line">              <span class="keyword">var</span> e = $window.editor.export;</span><br><span class="line">              _createJson(e.treeToData(tree));</span><br><span class="line">              <span class="keyword">var</span> subPath = path +vm.subPath;</span><br><span class="line">              <span class="comment">// 防止子目录没有。</span></span><br><span class="line">              fs.mkdir(subPath, &#123; <span class="attr">recursive</span>: <span class="literal">true</span> &#125;, <span class="function"><span class="keyword">function</span>(<span class="params">err</span>) </span>&#123;&#125;);</span><br><span class="line">              <span class="comment">// 再次导出，忽略掉custom_folders，减少json文件大小。</span></span><br><span class="line">              _createJson(e.treeToData(tree,<span class="literal">true</span>));</span><br><span class="line">              fs.writeFileSync(subPath+defaultName +<span class="string">&#x27;.json&#x27;</span>, vm.pretty);</span><br><span class="line">              notificationService.success(</span><br><span class="line">                <span class="string">&#x27;File saved&#x27;</span>,</span><br><span class="line">                defaultName +<span class="string">&#x27;.json&#x27;</span></span><br><span class="line">              );</span><br><span class="line">            &#125;);</span><br><span class="line">          &#125;);</span><br><span class="line">      &#125;</span><br></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/aerchi/article/details/106348750">https://blog.csdn.net/aerchi/article/details/106348750</a></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">A JavaScript error occured in the main process</span><br></pre></td></tr></table></figure>

<p>无法启动electron的desktop版本。</p>
<p>在代码里面有一份尝试创建目录的代码：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">_createIfNonExist</span>(<span class="params">path</span>) </span>&#123;</span><br><span class="line">  <span class="keyword">try</span> &#123;</span><br><span class="line">    <span class="keyword">var</span> s = nodejsService.fs.statSync(path);</span><br><span class="line">  &#125; <span class="keyword">catch</span> (e) &#123;</span><br><span class="line">    nodejsService.fs.mkdirSync(path);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>弹出框是通过 notification.service.js function _note(config)</p>
<p>里面的html可以定义这套显示的东西。</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> DEFAULT = &#123;</span><br><span class="line">  <span class="attr">type</span>    : <span class="string">&#x27;default&#x27;</span>,</span><br><span class="line">  <span class="attr">title</span>   : <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">message</span> : <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">icon</span>    : <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">delay</span>   : <span class="number">10000</span>, <span class="comment">// 将显示的时间延长</span></span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;notification-message&quot;</span> <span class="attr">style</span>=<span class="string">&quot; width:590px;</span></span></span><br><span class="line"><span class="string"><span class="tag">// 调整显示区域；</span></span></span><br></pre></td></tr></table></figure>

<p>界面还是通过 class 来做渲染，使用了 less 决定了界面样式。</p>
<p>最后使用的文件为 c_notification.less 文件。</p>
<figure class="highlight less"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 决定了宽度</span></span><br><span class="line"><span class="attribute">width</span>: <span class="variable">@size-sidebar</span>+<span class="variable">@icon-size</span>;</span><br><span class="line"><span class="comment">// 将这个数据从 200px -&gt; 1000px</span></span><br><span class="line"><span class="variable">@add-ntf-size :</span> <span class="number">1000px</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 对这些地方增加宽度</span></span><br><span class="line"><span class="attribute">width</span>: <span class="variable">@size-sidebar</span>+<span class="variable">@icon-size</span>+-<span class="variable">@add-ntf-size</span>;</span><br><span class="line"><span class="attribute">right</span>: -<span class="variable">@size-sidebar</span>+-<span class="variable">@icon-size</span>+-<span class="variable">@add-ntf-size</span>;</span><br></pre></td></tr></table></figure>

<p>最近将node.js版本降级到  v8.17.0 结果不能支持迭代创建目录了。尝试将版本升级到 v10.x 再来尝试，果然好了。</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> fs = <span class="built_in">require</span>(<span class="string">&#x27;fs&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> subPath=<span class="string">&#x27;E:/work_client/server/res/ai/base/SubTree/&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">// subPath</span></span><br><span class="line">fs.mkdir(subPath, &#123; <span class="attr">recursive</span>: <span class="literal">true</span> &#125;, <span class="function"><span class="keyword">function</span>(<span class="params">err</span>) </span>&#123;</span><br><span class="line">    <span class="built_in">console</span>.log(err)</span><br><span class="line">&#125;);</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h1 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h1><ul>
<li>[1] <a target="_blank" rel="noopener" href="https://github.com/magicsea/behavior3editor">Behavior3editor源码</a></li>
<li>[2] <a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/18359887/bower-proxy-configuration">bowerrc配置项目</a></li>
<li>[3] <a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/15669091/bower-install-using-only-https">git地址从https转成git</a></li>
<li>[4] <a target="_blank" rel="noopener" href="https://blog.csdn.net/sunny_desmond/article/details/107506626">解决 ReferenceError: primordials is not defined</a></li>
<li>[5] <a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/55212864/error-ebusy-resource-busy-or-locked-rmdir">ebusy-resouce-busy</a></li>
<li>[6] <a target="_blank" rel="noopener" href="https://www.electronjs.org/">electronjs官网</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2021/03/15/2021/2021-03-15-BEHAVIOR3EDITOR%E5%AD%A6%E4%B9%A0/" data-id="ckrn3an7c001h20xw42p017lm" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/AI/" rel="tag">AI</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Game/" rel="tag">Game</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2021/03/16/2021/2021-03-16-recast.crowd%E7%AC%94%E8%AE%B0/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          RecastCrowd笔记
        
      </div>
    </a>
  
  
    <a href="/2021/03/06/2021/2021-03-06-ansible/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">ansible笔记</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/3D/" rel="tag">3D</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/AI/" rel="tag">AI</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/" rel="tag">C++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Game/" rel="tag">Game</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Go/" rel="tag">Go</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Math/" rel="tag">Math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Server/" rel="tag">Server</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Unreal-Engine4/" rel="tag">Unreal Engine4</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/" rel="tag">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/golang/" rel="tag">golang</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/guitar/" rel="tag">guitar</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/node-js/" rel="tag">node.js</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/" rel="tag">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/" rel="tag">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/recast/" rel="tag">recast</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/type/" rel="tag">type</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vscode/" rel="tag">vscode</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%BF%90%E7%BB%B4/" rel="tag">运维</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/3D/" style="font-size: 10px;">3D</a> <a href="/tags/AI/" style="font-size: 11.67px;">AI</a> <a href="/tags/C/" style="font-size: 15px;">C++</a> <a href="/tags/Game/" style="font-size: 18.33px;">Game</a> <a href="/tags/Go/" style="font-size: 13.33px;">Go</a> <a href="/tags/Linux/" style="font-size: 13.33px;">Linux</a> <a href="/tags/Math/" style="font-size: 11.67px;">Math</a> <a href="/tags/Server/" style="font-size: 16.67px;">Server</a> <a href="/tags/Unreal-Engine4/" style="font-size: 10px;">Unreal Engine4</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/golang/" style="font-size: 20px;">golang</a> <a href="/tags/guitar/" style="font-size: 10px;">guitar</a> <a href="/tags/node-js/" style="font-size: 10px;">node.js</a> <a href="/tags/protobuf/" style="font-size: 10px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/recast/" style="font-size: 11.67px;">recast</a> <a href="/tags/redis/" style="font-size: 10px;">redis</a> <a href="/tags/type/" style="font-size: 10px;">type</a> <a href="/tags/vscode/" style="font-size: 10px;">vscode</a> <a href="/tags/%E8%BF%90%E7%BB%B4/" style="font-size: 16.67px;">运维</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/06/">June 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/04/">April 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/03/">March 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/01/">January 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/12/">December 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/11/">November 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">March 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/">November 2018</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/07/19/2021/2021-07-19-etcd-learn/">go-etcd阅读笔记</a>
          </li>
        
          <li>
            <a href="/2021/07/19/2021/2021-07-19-socketop-learn/">REUSEPORT-REUSEADDR-学习</a>
          </li>
        
          <li>
            <a href="/2021/06/22/2021/2021-06-22-go-ethereum-learn/">go-ethereum阅读笔记</a>
          </li>
        
          <li>
            <a href="/2021/06/21/2021/2021-06-21-server%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/">server测试工具</a>
          </li>
        
          <li>
            <a href="/2021/06/09/2021/2021-06-09-pprof-doc/">go-pprof</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2021 Abel Sean<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>